/*package com.hy.enterprise.framework.jpa.core.service.impl;

import java.io.Serializable;
import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;



import com.hy.enterprise.framework.jpa.core.dao.IDao;
import com.hy.enterprise.framework.jpa.core.entity.Persistable;
import com.hy.enterprise.framework.jpa.core.service.AbstractService;
import com.hy.enterprise.framework.jpa.core.util.GenericsUtils;
import com.hy.enterprise.framework.jpa.core.util.MySpringUtil;
import com.hy.enterprise.framework.persistence.api.annotation.DaoA;
import com.hy.enterprise.framework.persistence.api.service.AbstractBusinessService;
import com.hy.enterprise.framework.service.ServiceException;
import com.hy.enterprise.framework.util.LibraUtil;
import com.hy.enterprise.framework.util.jpa.JpaUtil;
import com.hy.enterprise.framework.util.lang.AnnotationUtil;
import com.hy.enterprise.framework.util.logger.Slf4jLoggerUtil;
import com.hy.enterprise.framework.util.seam.SeamUtil;
//import com.hy.mydesktop.shared.persistence.domain.gxt.MyBaseModel;

public class AbstractServiceImpl<ServiceDao extends IDao> implements AbstractService//<ServiceDao> 
{
	public AbstractServiceImpl() {
		super();
		serviceDao =GenericsUtils.getSuperClassGenricType(this.getClass());

		if (serviceDao == null || serviceDao.equals(Object.class)) {
			logger.warn("AbstractServiceImpl<ServiceDao extends IDao> 不能获得 ServiceDao的类型，而是【" +
					serviceDao+"】");
		}else {
			logger.debug("AbstractServiceImpl<ServiceDao extends IDao> 获得 ServiceDao的实际类型，是【" +
					serviceDao+"】");
		} 
	}

	*//**
	 * 日志记录器
	 *//*
	
	
	private static Logger logger = LoggerFactory.getLogger(AbstractBusinessService.class);

	private static final long	serialVersionUID	=
	                                                  8240494730203524975L ;

	private Class<ServiceDao> serviceDao = null;
	
	
	

	@Override
	public <X> X findByIdentifier(String identifier) {
		ServiceDao iDao = getDao();

		return (X)iDao.findByIdentifier(identifier);

	}

	@Override
	public <X> List<X> getAllPersistentEntities() {
		ServiceDao iDao = getDao();

		return iDao.find();

	}

	public ServiceDao getDao(){
		if (serviceDao == null || serviceDao.equals(Object.class)) {
			throw new RuntimeException("AbstractServiceImpl<ServiceDao extends IDao> 不能获得 ServiceDao的类型");
		} else {
			String serviceDaoName= serviceDao.getSimpleName();

			String springComponentName = 
				serviceDaoName.substring(0, 1).toLowerCase()+serviceDaoName.substring(1);
			
			logger.debug("获得名称为【" +
					springComponentName+"】的spring组件");
			IDao iDao = (IDao) MySpringUtil.getSpringComponent(springComponentName);
			return (ServiceDao)iDao;

		}
	}

	@Override
	public void persistEntity(Serializable entity) {
		// TODO Auto-generated method stub
		
	}
	

}*/
